using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class tbs_InvalidAcctsMap : EntityTypeConfiguration<tbs_InvalidAccts>
    {
        public tbs_InvalidAcctsMap()
        {
            // Primary Key
            this.HasKey(t => t.Account_type);

            // Properties
            this.Property(t => t.ID)
                .HasMaxLength(6);

            this.Property(t => t.Name)
                .HasMaxLength(110);

            this.Property(t => t.Account_type)
                .IsRequired()
                .HasMaxLength(49);

            this.Property(t => t.Account)
                .HasMaxLength(40);

            // Table & Column Mappings
            this.ToTable("tbs_InvalidAccts");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Account_type).HasColumnName("Account_type");
            this.Property(t => t.Account).HasColumnName("Account");
        }
    }
}
